package com.wonders.hisdoctor.station.project.medicine.mapper;

import com.wonders.hisdoctor.station.project.base.domain.OutpCipherPrescDetail;
import com.wonders.hisdoctor.station.project.base.domain.OutpPresc;
import com.wonders.hisdoctor.station.project.medicine.vo.CipherPrescDetailVO;
import com.wonders.hisdoctor.station.project.medicine.vo.OutpCipherPrescVo;
import com.wonders.hisdoctor.station.project.medicine.vo.QryCipherPrescVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author 张澎_9970
 * @date 2021.2.28 下午 6:38 星期日
 * @desc: 协定处方_Mapper
 */
@Mapper
@Repository
public interface CipherPrescMapper {

    Double cipherCheck(@Param("detail") OutpCipherPrescDetail detail, @Param("expireRangeDays") Integer expireRangeDays);

    Double getFrozenQuantity(OutpCipherPrescDetail detail);

    List<CipherPrescDetailVO> queryCipherPrescDetail(String cipherId);

    List<OutpPresc> getPrescs(String patientId,String code,String spec,Date visitDate);

    List<OutpCipherPrescVo> qryCipherPresc(QryCipherPrescVO qryCipherPrescVO);
}
